package com.projectc.db.entities;

import java.util.List;

import javax.persistence.EmbeddedId;
import javax.persistence.OneToMany;

public class Article {

	@EmbeddedId
	private ArticlePK idArticle;

	private String text;
	private User creator;
	private boolean editable;
	private boolean allowComments;

	@OneToMany
	private List<Comments> comments;
	private List<Tags> tags;

	public ArticlePK getIdArticle() {
		return idArticle;
	}

	public void setIdArticle(ArticlePK idArticle) {
		this.idArticle = idArticle;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public User getCreator() {
		return creator;
	}

	public void setCreator(User creator) {
		this.creator = creator;
	}

	public boolean isEditable() {
		return editable;
	}

	public void setEditable(boolean editable) {
		this.editable = editable;
	}

	public boolean isAllowComments() {
		return allowComments;
	}

	public void setAllowComments(boolean allowComments) {
		this.allowComments = allowComments;
	}

	public List<Comments> getComments() {
		return comments;
	}

	public void setComments(List<Comments> comments) {
		this.comments = comments;
	}

	public List<Tags> getTags() {
		return tags;
	}

	public void setTags(List<Tags> tags) {
		this.tags = tags;
	}

}
